//! \file Class.cpp
//! \brief TODO: Document
// -----------------------------------------------------------------------------
//! This program is free software; you can redistribute it and/or
//! modify it under the terms of the GNU General Public License
//! as published by the Free Software Foundation; either version 2
//! of the License, or (at your option) any later version.
//!
//! This program is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with this program; if not, write to the Free Software Foundation,
//! Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// -----------------------------------------------------------------------------

#include "Class.h"
#include "Dice.h"

// =====[ Local Definitions ]===================================================

// =====[ Local DataTypes ]=====================================================

// =====[ Local Variables ]=====================================================

// =====[ Local Functions ]=====================================================

// =====[ Private (Internal) Methods ]==========================================

// =====[ Local Implementation ]================================================

namespace DnD
{

Class::Class(eClass AClass)
{
  // TODO Auto-generated constructor stub
  m_Class = AClass;
}

Class::~Class()
{
  // TODO Auto-generated destructor stub
}


// TODO: document
eClass Class::getClass()
{
  return m_Class;
}


// TODO: document
Coins Class::rollStartGold()
{
//  Coins Result;
  std::tINT16 GoldPieces;

  switch (m_Class)
  {
    case eCLASS_FIGHTER:
    case eCLASS_PALADIN:
    case eCLASS_RANGER:
      GoldPieces = mROLL("6d4*10");
      break;

    case eCLASS_CLERIC:
    case eCLASS_MONK:
    case eCLASS_ROGUE:
      GoldPieces = mROLL("5d4*10");
      break;

    case eCLASS_BARBARIAN:
    case eCLASS_BARD:
    case eCLASS_WIZARD:
      GoldPieces = mROLL("4d4*10");
      break;

    case eCLASS_SORCERER:
      GoldPieces = mROLL("3d4*10");
      break;

    case eCLASS_DRUID:
      GoldPieces = mROLL("2d4*10");
      break;

    default:
      GoldPieces = 0;
      break;
  }

  return (Coins(0, 0, GoldPieces, 0));

  // Return the starting gold.
//  return (Result);
}

}
